# -*- coding: utf-8 -*-

import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *


class MainWindow(QWidget):

    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent=parent)

        self.setWindowTitle("QPixmap示例")

        lab = QLabel()
        lab.setPixmap(QPixmap("./001.jpg"))

        vbox = QVBoxLayout()
        vbox.addWidget(lab)
        self.setLayout(vbox)


if __name__ == '__main__':
    app = QApplication(sys.argv)
    win = MainWindow()
    win.show()
    sys.exit(app.exec())